import axios from '@/utils/request.js'

export function addCartList({ skuId, count }) {
  return axios({
    url: '/member/cart',
    method: 'post',
    data: {
      skuId,
      count,
    },
  })
}
export function getCartList() {
  return axios({
    url: '/member/cart',
    method: 'get',
  })
}
export function deleteCart(ids) {
  return axios({
    url: `/member/cart/`,
    method: 'delete',
    data: {
      ids,
    },
  })
}
export function mergeCartList(data) {
  return axios({
    url: '/member/cart/merge',
    method: 'post',
    data,
  })
}
export function getCheckoutInfo() {
  return axios({
    url: '/member/order/pre',
    method: 'get',
  })
}
